<?php

namespace app\admin\validate;

use think\Validate;

class Position extends Validate
{
    protected $rule = [
        'position'                => 'require|unique:position',
        'status'                  => 'require',
    ];

    protected $message = [
        'position.require'         => '职位不能为空',
        'status.require'           => '状态不能为空',
        'position.unique'          => '职位已存在',
    ];
    protected $scene = [
        'edit'  => ['id','position','status'],
        'add'  => ['position','status'],
    ];
}


